This Week in Perl 6, April 4-11, 2005

Whoa! Deja vu! Where’d Matt go?

Don’t worry, Matt’s still writing summaries. As you may have noticed, Matt’s been writing summaries every two weeks. Now so am I. Because we love you, we’ve decided to arrange things so I write summaries in the weeks when Matt doesn’t. We could do it the other way, but that some could see as self-defeating. Heck, when I say “some” I probably mean “all.”

So bear with me while I remember how to type all those accented characters and get back into the swing of writing these things (and of reading everything in the mailing lists once more–someone should write a summary for us summarizers).

I’ll be sticking to my old “lists in alphabetical order” scheme of writing summaries. Let’s get going.

This Week in perl6-compiler

Array of Arrays, Hash of Hashes, Elems, Last

Lev Selector asked for confirmation that Pugs didn’t support compound data structures, @ar.elems, or @ar.last. Autrijus and others confirmed that they didn’t then, but they do now.

MakeMaker6 Stalls on Takeoff

Darren Duncan pointed out that while last week’s summary had claimed he was working on implementing MakeMaker in Perl 6, this is, sadly, not the case. He reckoned he’d possibly look into it again when he had tuits and Pugs was more complete (supporting objects, for instance).

Declaration Oddness

Roie Marianer pointed out what looks like some weirdness in Pugs’ parsing of lexically scoped subroutines. Warnock applies.

Toronto Pugs Hackathon

John Macdonald asked for people who wanted to come to the YAPC::NA Pugs hackathon to get in touch with him beforehand, as there is limited space. If you’re interested, drop him a line.

Pugs Slice Oddities

Andrew Savige noticed some weirdness in Pugs’s slicing behavior. He posted some example code showing the problem. Autrijus agreed that there was a problem and explained that he was in the process of rewriting all the variable types, symbol tables, and casting rules to agree with the Perl 5 model as described in perltie.pod. The rewrite is currently failing tests, so he posted a patch for people who want to play. On Sunday, he bit the bullet and committed the entire 2500-line patch which “touches pretty much all evaluator code.”

Meanwhile, in perl6-internals

Tcl, Unicode

William Coleda has been trying to add Unicode support to his Tcl implementation and he fell across issues with missing methods in charset/unicode.h. Leo waved a magic wand and checked in an implementation that he fenced around with disclaimers.

The Status of Ponie

Nicholas Clark confessed that Ponie had stalled for some time, but sweetened the pill by announcing that it’s about to restart and that he will be able to allocate at least one day a week to the project. He pointed people at the Ponie intro/roadmap that breaks down the required tasks between here and a first release, complete with time estimates. If you’re interested in getting Ponie to a ridable state, this is a good place to start.

People were pleased.

Monthly Release Schedule

Chip donned his “Fearless Leader” hat and announced that Parrot will move to a monthly release schedule (with an initial three-week “month” to get things into sync). There was some debate about whether Solaris/SPARC should be one of the officially required monthly release platforms (Darwin, linux-x86-gcc3.*, and win32-ms-cl were Chip’s initial blessed three). This morphed into a discussion of Tinderbox; apparently there are cool things happening behind the scenes.

Calling Convention Abstraction

What do you know? You go away for n months and when you come back people are still talking about calling conventions.

Dynamic Perl, Part 1

William Coleda announced that he was starting work on removing the core’s dependence on Perl* PMCs in favor of using language-agnostic PMCs internally and loading the Perl ones dynamically as required. He dealt with everything but PerlArray quickly and the list discussed names and ways forward with that tricky case. It looks like someone with tuits needs to add and write tests for some vtable methods for ResizablePMCArray.

Subversion

Another discussion that wouldn’t go away back when I was last writing summaries has come to a head. Parrot’s finally migrating from CVS to Subversion. By the time you read this, Parrot’s main repository should be at svn.perl.org/parrot. Hurrah!

There were, of course, wrinkles to iron out.

The imcc/ Subdirectory

Matt Diephouse wondered if, now that IMCC has been integrated with Parrot, we really need the imcc/ subdirectory. He suggested that maybe its contents should be distributed about the rest of the Parrot directory structure. MrJoltCola (Melvin Smith?) thought it was best kept separate and thought of as a front end. Bernhard Schmalhofer pointed out PAST, another Parrot front end, and suggested that it may make sense to refactor imcc/main.c into (he suggests) src/main.c and imcc/frontend.c, which would make the distinction rather clearer and provide an opportunity to clean up the exported symbols. Leo pretty much agreed with Melvin (no comment on Bernhard’s suggestions yet, though).

Perl Jobs for the Willing

Leo looked for volunteers to rejig t/src/manifest.t to use .svn/Entries instead of CVS/Entries when checking the MANIFEST. Michael Schwern (possibly accidentally) volunteered.

Meanwhile, in perl6-language

A quick note about notation: I’ve started borrowing notation from Ruby/Smalltalk to discuss methods. Where I write SomeClass#method, then I am referring to an instance method of SomeClass and where I write SomeClass.method, I am referring to a class method.

Identity Tests and Comparing Two References

By heck, but I’ve not been keeping up.

I started understanding what was going on when people started talking about implicit dereferencing of long chains of references. Larry’s saying that even if $foo is a reference to a reference to a reference to a … to “10,” then $$foo will chase all the way along the reference chain and evaluate to “10.” The general response seemed to be, “Wah! How do I make it not do that?”

How to help Larry

say What?

Ovid wondered if say (and print, come to that) should default to printing the current topic. An initial hunt through the Perl 6 documents proved to be “like trying to sip through a firehose,” so he asked the list (and dropped a heavy hint about indexing the docs).

According to Luke, it should default to the current topic.

Blocks, Continuations, and eval()

Wolverian’s been looking at the Perl 5 debugger and wondered if it would be possible to add an eval method to objects that represent scopes. The idea is that:

$scope.eval 'say $foo'

would evaluate say $foo with all of $scope’s bindings, etc. in place. (I wonder what $scope.eval 'return' would do.) At least, that’s what I think he meant. Others asked for clarification. Wolverian also wanted to know how to get hold of a scope’s continuation (or at least the current continuation). Larry has in the past said that he wouldn’t expose continuations in the core language. Others have noted that it wouldn’t be beyond the bounds of possibility to write a Parrot-level module which would expose them, though.

Questions on $pair.kv

Stevan Little had some questions about the behavior of the Pair#kv method. Luke came through with the answer (“when all else fails, consider the pair to be a one-element hash”).

Managing PLEAC

Prompted by a suggestion from Tim Bunce, Ovid started porting the examples in the Perl Cookbook into idiomatic Perl 6. He asked for comments and suggestions on how to proceed.

Marcus Adair proposed, and Luke Palmer strongly seconded, moving the development of the code onto a mediawiki (wikipedia)-style Wiki that has good support for “offline” discussion of code as it develops. Autrijus reckoned that his current practice of handing out SVN committer bits to anyone who expressed an interest and leaving discussion in the files themselves seems to be working pretty well so far. He pointed at pugs.kwiki.org, though.

Collaborative Synopses

Bryan Ingerson posted a preliminary cut of Synopsis 26 and asked for comments. Yuval Kogman pointed out that the docs/ subdirectory of the Pugs distribution is filled with documentation that needed proofreading and nitpicking. Go to it, people.

Aliasing Swapped Values

Ovid wondered what:

($x,$y) := ($y, $x)

would do.

Juerd reckoned the answer is straightforward, and I must say I agree with him.

String#chars in a List Context

Marcus Adair argued that it seems natural that String#chars, when used in a list context, should return a list of the Unicode chars in the string. Opinion seemed to favor the idea, but there’s been no ruling from Larry (or anyone else on the Design Team).

Whither use English

David Vergin wondered if Perl 6 would have an equivalent of use English, which will give sensible names to the various magic globals (those that still exist, least). The answer: yes and no. There will be no English.pm module, but the magic globals will all have English names by default.

Heredocs and Their Workings

Marcus Adair wondered about the use of Heredocs as positional parameters. Luke confirmed that they should work just like they do in Perl 5, modulo minor matters of spelling (now qq::to/END/, etc.) and whitespace removal.

Slicing Conflict

Luke pointed out that:

my @a = (1,2,3,4);
my @b = @a[1...];
say +@b;

is potentially problematic (he argues it should print “3”, but Perl 5 semantics imply that it should print “Inf”). He proposed breaking with the Perl 5 way. Autrijus agreed with him and has implemented his proposal in Pugs.

Coo–That Was Fun, I Think I’ll Do It Again Some Time

If you find these summaries useful or enjoyable, please consider contributing to the Perl Foundation to help support the development of Perl.

Or you can check out my website. Maybe now that I’m back writing stuff, I’ll start updating it. There are also vaguely pretty photos by me.

That’s quite enough shameless self-promotion. See you in two weeks.

Tags

Feedback

Something wrong with this article? Help us out by opening an issue or pull request on GitHub